package org.example.DesignPatterns.Singleton;

/**
 * @description:饿汉式单例   缺点：若没人使用则浪费空间
 * @author: farprt
 * @create: 2022-09-12 17:12
 **/
public class EagerSun {

    private static final EagerSun EagerSun=new EagerSun();


    private EagerSun(){

    }

    public static EagerSun getInstance(){
        return EagerSun;
    }

}
